Direct mode module with motion flag precoding and methods for use therewith

ABSTRACT

A motion compensation module can be used in a video encoder that encodes, into a processed video signal, a video input signal including a sequence of pictures. The motion compensation module includes a motion flag generation module that generates a motion flag for at least one of the plurality of macroblocks of a first picture of the sequence of pictures based on a corresponding macroblock of a plurality of macroblocks of a second picture of the sequence of pictures. A direct mode motion vector module evaluates a direct mode motion vector for the corresponding macroblock of the second picture, based on the motion flag for the at least one of the plurality of macroblocks of the first picture.

TECHNICAL FIELD OF THE INVENTION

The present invention relates to filtering and encoding used in devicessuch as video encoders/codecs.

DESCRIPTION OF RELATED ART

Video encoding has become an important issue for modern video processingdevices. Robust encoding algorithms allow video signals to betransmitted with reduced bandwidth and stored in less memory. However,the accuracy of these encoding methods face the scrutiny of users thatare becoming accustomed to greater resolution and higher picturequality. Standards have been promulgated for many encoding methodsincluding the H.264 standard that is also referred to as MPEG-4, part 10or Advanced Video Coding, (AVC). While this standard sets forth manypowerful techniques, further improvements are possible to improve theperformance and speed of implementation of such methods.

Further limitations and disadvantages of conventional and traditionalapproaches will become apparent to one of ordinary skill in the artthrough comparison of such systems with the present invention.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS

FIGS. 1-3 present pictorial diagram representations of various videoprocessing devices in accordance with embodiments of the presentinvention.

FIG. 4 presents a block diagram representation of a video processingdevice 125 in accordance with an embodiment of the present invention.

FIG. 5 presents a block diagram representation of a video encoder 102that includes direct mode module 208 in accordance with an embodiment ofthe present invention.

FIG. 6 presents a block diagram representation of a direct mode module208 in accordance with an embodiment of the present invention.

FIG. 7 presents a graphical representation of the relationship betweencorresponding macroblocks in two pictures in a video input signal.

FIG. 8 presents a graphical representation of the relationship betweenexample top frame and bottom frame macroblocks (250, 252) and exampletop field and bottom field macroblocks (254, 256) in accordance with anembodiment of the present invention.

FIG. 9 presents a graphical representation that shows example macroblockpartitioning in accordance with an embodiment of the present invention.

FIG. 10 presents a block diagram representation of a video distributionsystem 175 in accordance with an embodiment of the present invention.

FIG. 11 presents a block diagram representation of a video storagesystem 179 in accordance with an embodiment of the present invention.

FIG. 12 presents a flowchart representation of a method in accordancewith an embodiment of the present invention.

DETAILED DESCRIPTION OF THE INVENTION INCLUDING THE PRESENTLY PREFERREDEMBODIMENTS

FIGS. 1-3 present pictorial diagram representations of various videoprocessing devices in accordance with embodiments of the presentinvention. In particular, set top box 10 with built-in digital videorecorder functionality or a stand alone digital video recorder, computer20 and portable computer 30 illustrate electronic devices thatincorporate a video processing device 125 that includes one or morefeatures or functions of the present invention. While these particulardevices are illustrated, video processing device 125 includes any devicethat is capable of encoding video content in accordance with the methodsand systems described in conjunction with FIGS. 4-12 and the appendedclaims.

FIG. 4 presents a block diagram representation of a video processingdevice 125 in accordance with an embodiment of the present invention. Inparticular, video processing device 125 includes a receiving module 100,such as a television receiver, cable television receiver, satellitebroadcast receiver, broadband modem, 3G transceiver or other informationreceiver or transceiver that is capable of receiving a received signal98 and extracting one or more video signals 110 via time divisiondemultiplexing, frequency division demultiplexing or otherdemultiplexing technique. Video encoding module 102 is coupled to thereceiving module 100 to encode or transcode the video signal in a formatcorresponding to video display device 104.

In an embodiment of the present invention, the received signal 98 is abroadcast video signal, such as a television signal, high definitiontelevisions signal, enhanced high definition television signal or otherbroadcast video signal that has been transmitted over a wireless medium,either directly or through one or more satellites or other relaystations or through a cable network, optical network or othertransmission network. In addition, received signal 98 can be generatedfrom a stored video file, played back from a recording medium such as amagnetic tape, magnetic disk or optical disk, and can include astreaming video signal that is transmitted over a public or privatenetwork such as a local area network, wide area network, metropolitanarea network or the Internet.

Video signal 110 can include an analog video signal that is formatted inany of a number of video formats including National Television SystemsCommittee (NTSC), Phase Alternating Line (PAL) or Sequentiel CouleurAvec Memoire (SECAM). Processed video signal 112 can operate inaccordance with a digital video codec standard such as H.264, MPEG-4Part 10 Advanced Video Coding (AVC) or other digital format such as aMotion Picture Experts Group (MPEG) format (such as MPEG1, MPEG2 orMPEG4), Quicktime format, Real Media format, Windows Media Video (WMV)or Audio Video Interleave (AVI), etc.

Video display devices 104 can include a television, monitor, computer,handheld device or other video display device that creates an opticalimage stream either directly or indirectly, such as by projection, basedon decoding the processed video signal 112 either as a streaming videosignal or by playback of a stored digital video file.

Video encoder 102 includes a direct mode module 208 that operates inaccordance with the present invention and, in particular, includes manyoptional functions and features described in conjunction with FIGS. 5-12that follow.

FIG. 5 presents a block diagram representation of a video encoder 102that includes direct mode module 208 in accordance with an embodiment ofthe present invention. In particular, video encoder 102 operates inaccordance with many of the functions and features of the H.264standard, the MPEG-4 standard, VC-1 (SMPTE standard 421M) or othertechnique, to encode a video input signal 110 that is converted to adigital format via a signal interface 198.

The video encoder 102 includes a processing module 200 that can beimplemented using a single processing device or a plurality ofprocessing devices. Such a processing device may be a microprocessor,co-processors, a micro-controller, digital signal processor,microcomputer, central processing unit, field programmable gate array,programmable logic device, state machine, logic circuitry, analogcircuitry, digital circuitry, and/or any device that manipulates signals(analog and/or digital) based on operational instructions that arestored in a memory, such as memory module 202. Memory module 202 may bea single memory device or a plurality of memory devices. Such a memorydevice can include a hard disk drive or other disk drive, read-onlymemory, random access memory, volatile memory, non-volatile memory,static memory, dynamic memory, flash memory, cache memory, and/or anydevice that stores digital information. Note that when the processingmodule implements one or more of its functions via a state machine,analog circuitry, digital circuitry, and/or logic circuitry, the memorystoring the corresponding operational instructions may be embeddedwithin, or external to, the circuitry comprising the state machine,analog circuitry, digital circuitry, and/or logic circuitry.

Processing module 200, and memory module 202 are coupled, via bus 220,to the signal interface 198 and a plurality of other modules, such asmotion search module 204, motion refinement module 206, direct modemodule 208, intra-prediction module 210, mode decision module 212,reconstruction module 214, entropy coding module 216, forward transformand quantization module 220 and deblocking filter module 222. Themodules of video encoder 102 can be implemented in software, firmware orhardware, depending on the particular implementation of processingmodule 200. It should also be noted that the software implementations ofthe present invention can be stored on a tangible storage medium such asa magnetic or optical disk, read-only memory or random access memory andalso be produced as an article of manufacture. While a particular busarchitecture is shown, alternative architectures using directconnectivity between one or more modules and/or additional busses canlikewise be implemented in accordance with the present invention.

Motion compensation module 150 includes a motion search module 204 thatprocesses pictures from the video input signal 110 based on asegmentation into macroblocks of pixel values, such as of 16 pixels by16 pixels size, from the columns and rows of a frame and/or field of thevideo input signal 110. In an embodiment of the present invention, themotion search module determines, for each macroblock or macroblock pairof a field and/or frame of the video signal one or more motion vectors(depending on the partitioning of the macroblock into subblocks asdescribed further in conjunction with FIG. 8) that represents thedisplacement of the macroblock (or subblock) from a reference frame orreference field of the video signal to a current frame or field. Inoperation, the motion search module operates within a search range tolocate a macroblock (or subblock) in the current frame or field to aninteger pixel level accuracy such as to a resolution of 1-pixel.Candidate locations are evaluated based on a cost formulation todetermine the location and corresponding motion vector that have a mostfavorable (such as lowest) cost.

In an embodiment of the present invention, a cost formulation is basedon the Sum of Absolute Difference (SAD) between the reference macroblockand candidate macroblock pixel values and a weighted rate term thatrepresents the number of bits required to be spent on coding thedifference between the candidate motion vector and either a predictedmotion vector (PMV) that is based on the neighboring macroblock to theleft of the current macroblock and on motion vectors from neighboringcurrent macroblocks of a prior row of the video input signal or anestimated predicted motion vector that is determined based on motionvectors from neighboring current macroblocks of a prior row of the videoinput signal. In addition, the cost calculation may or may not useneighboring subblocks within the current macroblock.

A motion refinement module 206 generates a refined motion vector foreach macroblock of the plurality of macroblocks, based on the motionsearch motion vector. In an embodiment of the present invention, themotion refinement module determines, for each macroblock or macroblockpair of a field and/or frame of the video input signal 110 a refinedmotion vector that represents the displacement of the macroblock from areference frame or reference field of the video signal to a currentframe or field. In operation, the motion refinement module refines thelocation of the macroblock in the current frame or field to a greaterpixel level accuracy such as to a resolution of ¼-pixel. Candidatelocations are also evaluated based on a cost formulation to determinethe location and refined motion vector that have a most favorable (suchas lowest) cost. As in the case with the motion search module, a costformulation is based on the sum of the Sum of Absolute Difference (SAD)between the reference macroblock and candidate macroblock pixel valuesand a weighted rate term that represents the number of bits required tobe spent on coding the difference between the candidate motion vectorand either a predicted motion vector (PMV) that is based on theneighboring macroblock to the left of the current macroblock and onmotion vectors from neighboring current macroblocks of a prior row ofthe video input signal or an estimated predicted motion vector that isdetermined based on motion vectors from neighboring current macroblocksof a prior row of the video input signal. In addition, the costcalculation can avoid the use of neighboring subblocks within thecurrent macroblock. In this fashion, motion refinement module 206 isable to operate on a macroblock to contemporaneously determine themotion search motion vector for each subblock of the macroblock.

When estimated predicted motion vectors are used the cost formulationcan avoid the use of motion vectors from the current row and both themotion search module 204 and the motion refinement module 206 canoperate in parallel on an entire row of video input signal 110, tocontemporaneously determine the refined motion vector for eachmacroblock in the row.

A direct mode module 208 generates direct mode motion vectors for eachmacroblock, based on a plurality of macroblocks that neighbor themacroblock. In an embodiment of the present invention, the direct modemodule 208 operates in a fashion such as defined by the H.264 standardor other standard, that determines a direct mode motion vector and thecost associated with candidate direct mode motion vectors that can beused in evaluating a mode decision.

Pertinent to the present invention, video encoder 102 operates based onbi-predictive or multi-predictive B-slices. In particular, macroblock orsub-macroblock motion is predicted based on two or more inter-picturepredictions. In B slices, to build a prediction, some macroblocks mayuse a weighted average of different motion compensated predictionvalues. Different types of inter prediction can be supported such aslist 0, list 1, bi-predictive and direct prediction. For bi-predictionmode, a weighted average of motion compensated list 0 and list 1prediction signals is used for the prediction signal. In directprediction mode, macroblock pixel values are inferred based onpreviously transmitted values. For instance, when macroblocks orsub-macroblocks exhibit no motion, i.e. do not change from picture topicture, coding can be performed by sending very few bits indicatingdirect mode conditions and particularly without sending a quantizederror prediction signal or a motion vector, in effect, a zer0-valuedmotion vector. For B-slice pictures, this condition is referred to asB_Skip.

In accordance with the present invention, the direct mode module 208includes a direct mode motion vector module that generates the directmode motion vector based on a motion flag generated by a motion flaggeneration module. In particular, the motion flag is generated andstored in the processing of one frame or field of the video signal forretrieval when evaluating the direct mode motion vector for a subsequentframe or field of the video signal.

While the prior modules have focused on inter-prediction of the motionvector, intra-prediction module 210 generates a best intra predictionmode for each macroblock of the plurality of macroblocks. In particular,intra-prediction module 210 operates in a fashion such as defined by theH.264 standard to evaluate a plurality of intra prediction modes, basedon motion vectors determined from neighboring macroblocks to determinethe best intra prediction mode and the associated cost.

A mode decision module 212 determines a final motion vector for eachmacroblock of the plurality of macroblocks based on costs associatedwith the refined motion vector, the direct mode motion vector, and thebest intra prediction mode, and in particular, the method that yieldsthe most favorable (lowest) cost, or an otherwise acceptable cost. Areconstruction module 214 generates residual luma and chroma pixelvalues corresponding to the final motion vector for each macroblock ofthe plurality of macroblocks.

A forward transform and quantization module 220 of video encoder 102generates processed video signal 112 by transforming coding andquantizing the residual pixel values into quantized transformedcoefficients that can be further coded, such as by entropy coding inentropy coding module 216, filtered by de-blocking filter module 222 andoutput as the processed video signal 112 via signal interface 198 to betransmitted and/or stored.

While not expressly shown, video encoder 102 can include a memory cache,a memory management module, a comb filter or other video filter, and/orother module to support the encoding of video input signal 110 intoprocessed video signal 112.

FIG. 6 presents a block diagram representation of a direct mode module208 in accordance with an embodiment of the present invention. Asdiscussed in conjunction with FIG. 5, direct mode module includes adirect mode motion vector module and motion flag generation module, suchas direct mode motion vector module 260 and motion flag generationmodule 262. In addition, direct mode module can include other modules(not shown) for performing other direct mode functions in a traditionalfashion.

Motion flag generation module 262 generates a motion flag 264 for atleast one of the plurality of macroblocks of a first picture of thesequence of pictures based on a corresponding macroblock of a pluralityof macroblocks of a second picture of the sequence of pictures. Themotion flag 264 can be a flag having a single bit that has a first valuethat indicates motion and a second value that indicates substantially nomotion in relation between the at least one of the plurality ofmacroblocks or partition of a first picture of the sequence of picturesand the corresponding macroblock or partition of a plurality ofmacroblocks of a second picture of the sequence of pictures. Direct modemotion vector module 260 generates direct mode motion vector data 270for the corresponding macroblock of the second picture, based on themotion flag 264 for the at least one of the plurality of macroblocks ofthe first picture and based on macroblock data 268.

It should be noted that the motion flag 264 can stored in conjunctionwith processing by the flag generation module 262 of the first picturefor retrieval when processing by the direct mode motion vector module260 of the second picture. This pre-calculation during the processing ofthe first picture can save storage of more detailed information thatwould be required during the evaluation of a direct mode motion vectorof the second picture and simplify the processing performed during theevaluation of a direct mode motion vector of the second picture. In anembodiment of the present invention, direct mode motion vector module260 determines a B_Skip condition when processing a B-picture, andgenerates the direct mode motion vector data 270 that includes azero-valued direct mode motion vector without a coefficient, only whenthe motion flag 264 indicates substantially no motion.

In an embodiment of the present invention, the motion flag generationmodule 262 evaluates motion data 266 such as a direct motion vector,predicted motion vector or other motion data that represents the motionof a macroblock of a first picture with reference to a second picturethat occurs after the first picture in the sequence of pictures thatmake up the video signal 110. In particular, motion flag generationmodule 262 can determine a cost associated with a motion vectorcalculated in conjunction with the first picture, such as a sum ofabsolute differences or sum or absolute transformed differences cost orcan otherwise estimate the magnitude of the motion indicated by motiondata 266. In response, motion flag generation module 262 set the motionflag 264 to the first value in the presence of motion that woulddisqualify a B_Skip condition. Otherwise, the flag generation module 262sets the motion flag to a second value, indicating an acceptable amountof motion, such as no motion or substantially no motion, that wouldqualify for B_Skip condition.

In this fashion, when direct mode motion vector module 260 evaluates thedirect mode motion vector for the second picture, these calculationsneed not be performed again. If the motion flag 264 has a second valueindicating no motion or substantially no motion, the direct mode motionvector module 260 could optionally generate a zero-valued direct modemotion vector without a coefficient.

Further details including several optional features of direct modemotion vector module 260 and motion flag generation module 262 will bedescribed further in conjunction with FIG. 7 that follows.

FIG. 7 presents a graphical representation of the relationship betweencollocated macroblocks in two pictures in a video input signal. Inparticular, pictures 280 and 282 represent frames or fields in asequence of pictures of a video signal such as video signal 110. Picture282 occurs subsequent to picture 280 and can be the next picture or asubsequent picture with one or more intervening pictures—particularly inconjunction with a multi-predictive mode. Block 284 represents amacroblock or sub-macroblock of picture 280 and block 286 represents acorresponding macroblock or sub-macroblock of picture 282. Inbi-predictive or multi-predictive processing of picture 280, block 284is referenced to block 286. In this example, a motion flag, such asmotion flag 264 is generated in conjunction with the processing ofpicture 280 and stored in a register, cache, buffer or other memorystructure that optionally includes other collocated information such asmotion vectors, neighbor data, frame and/or field data used in theencoding processing with respect to at least pictures 280 and 282. Aswill be recognized, this collocated information is temporarily storedduring the processing of two or more pictures of video signal 110 andthen overwritten, erased or otherwise discarded to make room for datacorresponding to subsequent pictures of video signal 110.

As discussed in conjunction with FIGS. 5 and 6, the motion flaggenerated in conjunction with picture 280 is retrieved and used whileprocessing of picture 282, in particular when picture 282 evaluates adirect mode motion vector for macroblock 286.

FIG. 8 presents a graphical representation of the relationship betweenexemplary top frame and bottom frame macroblocks (250, 252) andexemplary top field and bottom field macroblocks (254, 256). Motionsearch module 204 generates a motion search motion vector for eachmacroblock by contemporaneously evaluating a macroblock pair thatincludes a top frame macroblock 250 and bottom frame macroblock 252 froma frame of the video input signal 110 and a top field macroblock 254 anda bottom field macroblock 256 from corresponding fields of the videoinput signal 110.

Considering the example shown, each of the macroblocks are 16 pixels by16 pixels in size. Motion search is performed in full pixel resolution,or other resolution, either coarser or finer, by comparing a candidateframe macroblock pair of a current frame that includes top framemacroblock 250 and bottom frame macroblock 252 to the macroblock pair ofa reference frame. In addition, lines of a first parity (such as oddlines) from the candidate frame macroblock pair are grouped to form topfield macroblock 254. Similarly, lines of a second parity (such as evenlines) from the candidate frame macroblock pair are grouped to formbottom field macroblock 256. Motion search module 204 calculates a costassociated with a plurality of lines by:

(a) generating a cost associated with the top frame macroblock 250 basedon a cost accumulated for a plurality of top lines of the plurality oflines,

(b) generating a cost associated with the bottom frame macroblock 252based on a cost accumulated for a plurality of bottom lines of theplurality of lines,

(c) generating a cost associated with the top field macroblock 254 basedon a cost accumulated for a plurality of first-parity lines of theplurality of lines compared with either a top or bottom field reference,and

(d) generating a cost associated with the bottom field macroblock 256based on a cost accumulated for a plurality of second-parity lines ofthe plurality of lines, also based on either a top or bottom fieldreference. In this fashion, six costs can be generated contemporaneouslyfor the macroblock pair: top frame compared with top frame of thereference; bottom frame compared with the bottom frame of the reference;top field compared with top field of the reference; bottom fieldcompared with the bottom field of the reference; top field compared withbottom field of the reference; and bottom field compared with the topfield of the reference.

For example, each of these costs can be generated based on the sum ofthe absolute differences (SAD) of the pixel values of the current frameor field with the reference frame or field. The SADs can be calculatedcontemporaneously, in a single pass, based on the accumulation for eachline. The overall SAD for a particular macroblock (top or bottom, frameor field) can be determined by totaling the SADs for the lines that makeup that particular macroblock. Alternatively, the SADs can be calculatedin a single pass, based on the smaller segments such as 4×1 segmentsthat can be accumulated into subblocks, that in turn can be accumulatedinto overall macroblock totals. This alternative arrangementparticularly lends itself to motion search modules that operate based onthe partitioning of macroblocks into smaller subblocks, as will bediscussed further in conjunction with FIG. 9.

The motion search module 204 is particularly well adapted to operationin conjunction with macroblock adaptive frame and field processing.Frame mode costs for the current macroblock pair can be generated asdiscussed above. In addition, motion search module 204 optionallygenerates a field decision based on accumulated differences, such asSAD, between the current bottom field macroblock and a bottom fieldmacroblock reference, the current bottom field macroblock and a topfield macroblock reference, the current top field macroblock and thebottom field macroblock reference, and the current top field macroblockand the top field macroblock reference. The field decision includesdetermining which combination (top/top, bottom/bottom) or (top/bottom,bottom/top) yields a lower cost. Similarly, motion search module 204 canoptionally choose either frame mode or field mode for a particularmacroblock pair, based on whether the frame mode cost compares morefavorably (e.g. are lower) or less favorably (e.g. higher) to the fieldmode cost, based on the field mode decision. In addition, other modes ofmotion compensation module 150 operating on both frames and field can beused.

FIG. 9 presents a graphical representation of exemplary partitionings ofa macroblock of a video input signal into subblocks. While the modulesdescribed in conjunction with FIG. 8 above can operate on macroblockshaving a size such as 16 pixels×16 pixels, such as in accordance withthe H.264 standard, macroblocks can be partitioned into subblocks ofsmaller size, as small as 4 pixels on a side. The subblocks can be dealtwith in the same way as macroblocks. For example, motion search module204 can generate separate motion search motion vectors for each subblockof each macroblock, etc.

Macroblock 300, 302, 304 and 306 represent examples of partitioning intosubblocks in accordance with the H.264 standard. Macroblock 300 is a16×16 macroblock that is partitioned into two 8×16 subblocks. Macroblock302 is a 16×16 macroblock that is partitioned into three 8×8 subblocksand four 4×4 subblocks. Macroblock 304 is a 16×16 macroblock that ispartitioned into four 8×8 subblocks. Macroblock 306 is a 16×16macroblock that is partitioned into an 8×8 subblock, two 4×8 subblocks,two 8×4 subblocks, and four 4×4 subblocks. The partitioning of themacroblocks into smaller subblocks increases the complexity of themotion compensation by requiring various compensation methods, such asthe motion search to determine, not only the motion search motionvectors for each subblock, but the best motion vectors over the set ofpartitions of a particular macroblock. The result however can yield moreaccurate motion compensation and reduced compression artifacts in thedecoded video image.

FIG. 10 presents a block diagram representation of a video distributionsystem 175 in accordance with an embodiment of the present invention. Inparticular, processed video signal 112 is transmitted via a transmissionpath 122 to a video decoder 104. Video decoder 104, in turn can operateto decode the processed video signal 112 for display on a display devicesuch as television 10, computer 20 or other display device.

The transmission path 122 can include a wireless path that operates inaccordance with a wireless local area network protocol such as an 802.11protocol, a WIMAX protocol, a Bluetooth protocol, etc. Further, thetransmission path can include a wired path that operates in accordancewith a wired protocol such as a Universal Serial Bus protocol, anEthernet protocol or other high speed protocol.

FIG. 11 presents a block diagram representation of a video storagesystem 179 in accordance with an embodiment of the present invention. Inparticular, device 11 is a set top box with built-in digital videorecorder functionality, a stand alone digital video recorder, a DVDrecorder/player or other device that stores the processed video signal112 for display on video display device such as television 12. Whilevideo encoder 102 is shown as a separate device, it can further beincorporated into device 11. While these particular devices areillustrated, video storage system 179 can include a hard drive, flashmemory device, computer, DVD burner, or any other device that is capableof generating, storing, decoding and/or displaying the video content ofprocessed video signal 112 in accordance with the methods and systemsdescribed in conjunction with the features and functions of the presentinvention as described herein.

FIG. 12 presents a flowchart representation of a method in accordancewith an embodiment of the present invention. In particular, a method ispresented for use in conjunction with one or more of the features andfunctions described in association with FIGS. 1-11. In step 400, amotion flag is generated for at least one of the plurality ofmacroblocks of a first picture of the sequence of pictures based on acorresponding macroblock of a plurality of macroblocks of a secondpicture of the sequence of pictures. In step 402, a direct mode motionvector is evaluated for the corresponding macroblock of the secondpicture, based on the motion flag for the at least one of the pluralityof macroblocks of the first picture.

In an embodiment of the present invention, the motion flag canrepresented by a single bit that has a first value that indicates motionand a second value that indicates substantially no motion. Step 402 candetermine a zero-valued direct mode motion vector when or only when themotion flag indicates substantially no motion. Step 400 can includestoring the motion flag and the step 402 can include retrieving themotion flag. The second picture can correspond to a B picture of theprocessed video signal.

In preferred embodiments, the various circuit components are implementedusing 0.35 micron or smaller CMOS technology. Provided however thatother circuit technologies, both integrated or non-integrated, may beused within the broad scope of the present invention.

As one of ordinary skill in the art will appreciate, the term“substantially” or “approximately”, as may be used herein, provides anindustry-accepted tolerance to its corresponding term and/or relativitybetween items. Such an industry-accepted tolerance ranges from less thanone percent to twenty percent and corresponds to, but is not limited to,component values, integrated circuit process variations, temperaturevariations, rise and fall times, and/or thermal noise. Such relativitybetween items ranges from a difference of a few percent to magnitudedifferences. As one of ordinary skill in the art will furtherappreciate, the term “coupled”, as may be used herein, includes directcoupling and indirect coupling via another component, element, circuit,or module where, for indirect coupling, the intervening component,element, circuit, or module does not modify the information of a signalbut may adjust its current level, voltage level, and/or power level. Asone of ordinary skill in the art will also appreciate, inferred coupling(i.e., where one element is coupled to another element by inference)includes direct and indirect coupling between two elements in the samemanner as “coupled”. As one of ordinary skill in the art will furtherappreciate, the term “compares favorably”, as may be used herein,indicates that a comparison between two or more elements, items,signals, etc., provides a desired relationship. For example, when thedesired relationship is that signal 1 has a greater magnitude thansignal 2, a favorable comparison may be achieved when the magnitude ofsignal 1 is greater than that of signal 2 or when the magnitude ofsignal 2 is less than that of signal 1.

As the term module is used in the description of the various embodimentsof the present invention, a module includes a functional block that isimplemented in hardware, software, and/or firmware that performs one ormodule functions such as the processing of an input signal to produce anoutput signal. As used herein, a module may contain submodules thatthemselves are modules.

Thus, there has been described herein an apparatus and method, as wellas several embodiments including a preferred embodiment, forimplementing a video encoder and entropy coder with neighbor managementfor use therewith. Various embodiments of the present inventionherein-described have features that distinguish the present inventionfrom the prior art.

It will be apparent to those skilled in the art that the disclosedinvention may be modified in numerous ways and may assume manyembodiments other than the preferred forms specifically set out anddescribed above. Accordingly, it is intended by the appended claims tocover all modifications of the invention which fall within the truespirit and scope of the invention.

1. A direct mode module for use in a video encoder that encodes, into aprocessed video signal, a video input signal including a sequence ofpictures, the direct mode module comprising: a motion flag generationmodule that generates a motion flag for at least one of the plurality ofmacroblocks of a first picture of the sequence of pictures based on acorresponding macroblock of a plurality of macroblocks of a secondpicture of the sequence of pictures, wherein the motion flag has a firstvalue that indicates motion and a second value that indicatessubstantially no motion; a direct mode motion vector module thatevaluates a direct mode motion vector for the corresponding macroblockof the second picture, based on the motion flag for the at least one ofthe plurality of macroblocks of the first picture.
 2. The direct modemodule of claim 1 direct mode motion vector module determines azero-valued direct mode motion vector only when the motion flagindicates substantially no motion.
 3. The direct mode module of claim 1wherein the motion flag is a single bit flag.
 4. The direct mode moduleof claim 1 wherein the motion flag is stored in conjunction withprocessing by the direct mode motion vector module of the first picturefor retrieval when processing by the direct mode motion vector module ofthe second picture.
 5. The direct mode module of claim 1 wherein thefirst picture and the second picture are each one of, a field of theinput video signal and a frame of the input video signal.
 6. The directmode module of claim 1 wherein the second picture corresponds to a Bpicture of the processed video signal.
 7. The direct mode module ofclaim 1 wherein the video encoder operates in accordance with at leastone of, an Advanced Video Coding (AVC) format and a Motion PictureExperts Group (MPEG) format.
 8. A direct mode module for use in a videoencoder that encodes, into a processed video signal, a video inputsignal including a sequence of pictures, the direct mode modulecomprising: a motion flag generation module that generates a motion flagfor at least one of the plurality of macroblocks of a first picture ofthe sequence of pictures based on a corresponding macroblock of aplurality of macroblocks of a second picture of the sequence ofpictures; a direct mode motion vector module that evaluates a directmode motion vector for the corresponding macroblock of the secondpicture, based on the motion flag for the at least one of the pluralityof macroblocks of the first picture.
 9. The direct mode module of claim8 wherein the motion flag has a first value that indicates motion and asecond value that indicates substantially no motion.
 10. The direct modemodule of claim 9 direct mode motion vector module determines azero-valued direct mode motion vector only when the motion flagindicates substantially no motion.
 11. The motion compensation module ofclaim 9 wherein the motion flag is a single bit flag.
 12. The directmode module of claim 8 wherein the motion flag is stored in conjunctionwith processing by the direct mode motion vector module of the firstpicture for retrieval when processing by the direct mode motion vectormodule of the second picture.
 13. The direct mode module of claim 8wherein the first picture and the second picture are each one of, afield of the input video signal and a frame of the input video signal.14. The direct mode module of claim 8 wherein the second picturecorresponds to a B picture of the processed video signal.
 15. The directmode module of claim 8 wherein the video encoder operates in accordancewith at least one of, an Advanced Video Coding (AVC) format and a MotionPicture Experts Group (MPEG) format.
 16. A method for use in a videoencoder that encodes, into a processed video signal, a video inputsignal including a sequence of pictures, the motion compensation modulecomprising: generating a motion flag for at least one of the pluralityof macroblocks of a first picture of the sequence of pictures based on acorresponding macroblock of a plurality of macroblocks of a secondpicture of the sequence of pictures; evaluating a direct mode motionvector for the corresponding macroblock of the second picture, based onthe motion flag for the at least one of the plurality of macroblocks ofthe first picture.
 17. The method of claim 16 wherein the motion flaghas a first value that indicates motion and a second value thatindicates substantially no motion.
 18. The method of claim 17 whereinevaluating a direct mode motion vector determines a zero-valued directmode motion vector only when the motion flag indicates substantially nomotion.
 19. The method of claim 17 wherein the motion flag is a singlebit flag.
 20. The method of claim 16 wherein the step of generating themotion flag includes storing the motion flag and the step of evaluatingthe direct mode motion vector includes retrieving the motion flag. 21.The method of claim 16 wherein the second picture corresponds to a Bpicture of the processed video signal.
 22. The method of claim 16wherein the processed video signal is in accordance with at least oneof, an Advanced Video Coding (AVC) format and a Motion Picture ExpertsGroup (MPEG) format.